#include <iostream>
#include <opencv2/opencv.hpp>

using namespace std;
using namespace cv;

int main()
{
    cv::Mat m3 = cv::Mat::zeros(8, 8, CV_8UC3); // 创建8*8的矩阵，类型为CV_8UC1
    cout << "宽度:" << m3.cols << ",高度:" << m3.rows << ",通道数:" << m3.channels() << endl;
    cout << m3 << endl;

    m3 = Mat::ones(cv::Size(8, 8), CV_8UC3);
    cout << "宽度:" << m3.cols << ",高度:" << m3.rows << ",通道数:" << m3.channels() << endl;
    cout << m3 << endl; //这里输出每组数据是(1,0,0)

    m3 = cv::Scalar(127, 127, 127);
    cout << "宽度:" << m3.cols << ",高度:" << m3.rows << ",通道数:" << m3.channels() << endl;
    cout << m3 << endl; //这里输出每组数据是(127,127,127) 比较和ones的区别


    // m3 = cv::Scalar(10,10,10);
    // cout<<m3<<endl;
    return 0;
}
